<extend name="./Application/Common/View/block/base.php" />
<block name="header">
    <include file="./Application/Admin/View/block/easyui_header.php" />
    <link rel="stylesheet" href="__PUBLIC__/module/manage/css/visualization.css" />
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=FGxlOGqzEZu5SDriE0hMYqFx"></script>
    <script type="text/javascript" src="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.js"></script>
    <link rel="stylesheet" href="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.css" />

</block>
<block name="bdoy">
    <body>
    <div class="station-info">
        <div class="easyui-panel top-info" title="{:LANG('station_info')}" style="float:left;width: 48%;"
             data-options="iconCls:'icon-help',collapsible:false,minimizable:false,maximizable:false,closable:false">
            <ul>
                <li>{:LANG('pump_name')}: {$station['pups_name']}</li>
                <li>{:LANG('opr')}:
                    <br>
                    <volist name="admins" id="admin">
                        &nbsp;&nbsp;&nbsp;{$admin['realname']}({$admin['phone']})<br>
                    </volist>
                </li>
                <li>
                    {:LANG('status')}: {:filter_common_status($station['status'])}
                </li>
            </ul>
        </div>
        <div class="easyui-panel top-info" title="{:LANG('gps_info')}" style="float:left;width: 48%;"
             data-options="iconCls:'icon-help',collapsible:false,minimizable:false,maximizable:false,closable:false">
            <div id="allmap" style="height: 100%;width: 100%;"></div>
        </div>
    </div>
    <div class="pump-row">
        <ul class="pump-ul">
            <volist name="pumps" id="pump">
                <li>
                    <a href="javascript:open_dialog('/Manage/AdminPumpPump/log_index?pid={$pump['id']}')">
                        <div class="pump-div">
                            <img class="pump-img" src="__PUBLIC__/module/manage/image/pump.png">
                            <div class="pump-font"><span>{$pump['pump_number']}({$station['pups_name']})</span></div>
                            <img class="pump-dymic-icon" src="{:filter_deivce_status_icon(D('PumpPumpRecord')->get_last_one($pump['id']))}">
                        </div>
                    </a>
                </li>
            </volist>
            <volist name="macs" id="mac">
                <li>
                    <a  href="javascript:open_dialog('/Manage/AdminPumpMachine/log_index?pid={$mac['id']}')">
                        <div class="pump-div">
                            <img class="pump-img" src="__PUBLIC__/module/manage/image/machine.png">
                            <div class="pump-font"><span>{$mac['mac_number']}({$station['pups_name']})</span></div>
                            <img class="pump-dymic-icon" src="{:filter_deivce_status_icon(D('PumpMachineRecord')->get_last_one($mac['id']))}">
                        </div>
                    </a>
                </li>
            </volist>
            <volist name="wes" id="we">
                <li>
                    <a href="javascript:open_dialog('/Manage/AdminPumpWaterele/log_index?pid={$we['id']}')">
                        <div class="pump-div">
                            <img class="pump-img" src="__PUBLIC__/module/manage/image/river_gate.png">
                            <div class="pump-font"><span>{$we['we_number']}({$station['pups_name']})</span></div>
                            <img class="pump-dymic-icon" src="{:filter_deivce_status_icon(D('PumpWatereleRecord')->get_last_one($we['id']))}">
                        </div>
                    </a>
                </li>
            </volist>
        </ul>
    </div>


    </body>
</block>
<block name="footExtendJs">
<!--地图-->
    <script type="text/javascript">
        //		// 百度地图API功能
        //		var sContent ="台创园地处南昆铁路，324国道与九石阿旅游专线夹角地带，距石林风景区仅5公里，距云南省会昆明78公里。区域内拥有便捷的公路、铁路交通网络，区位优势明显。";
        //		var map = new BMap.Map("l-map");
        //		var point = new BMap.Point(103.370793,24.892553);
        //		map.centerAndZoom(point, 15);
        //		var infoWindow = new BMap.InfoWindow(sContent);  // 创建信息窗口对象
        //		map.openInfoWindow(infoWindow,point); //开启信息窗口
        //		document.getElementById("r-result").innerHTML = "信息窗口的内容是：<br />" + infoWindow.getContent();



        // 百度地图API功能
        var map = new BMap.Map('allmap');
        var poi = new BMap.Point({$station['pups_point']});
        map.centerAndZoom(poi, 17);
        map.enableScrollWheelZoom();

        var content = '{$station['pups_name']}';

        //创建检索信息窗口对象
        var searchInfoWindow = new BMapLib.SearchInfoWindow(map, content, {
            title  : "{$station['pups_name']}",      //标题
            width  : 50,             //宽度
            height : 20,              //高度
            panel  : "panel",         //检索结果面板
            enableAutoPan : true,     //自动平移
            searchTypes   :[
//					BMAPLIB_TAB_SEARCH,   //周边检索
//					BMAPLIB_TAB_TO_HERE,  //到这里去
//					BMAPLIB_TAB_FROM_HERE //从这里出发
            ]
        });
        var marker = new BMap.Marker(poi); //创建marker对象
        //	    marker.enableDragging(); //marker可拖拽
        map.addOverlay(marker); //在地图中添加marker
        searchInfoWindow.open(marker);

    </script>

    <!--地图-->

</block>
